﻿#ifndef STU_SIGN_IN_H
#define STU_SIGN_IN_H

#include <QWidget>
#include <opencv2/imgcodecs.hpp>
#include<vector>
#include"face.hpp"
#include<QTimer>
#include<opencv2/opencv.hpp>
#include<QDebug>
using namespace cv;
namespace Ui {
class Stu_sign_in;
}

class Stu_sign_in : public QWidget
{
    Q_OBJECT

public:
    explicit Stu_sign_in(QWidget *parent = nullptr);
    ~Stu_sign_in();

private:
    Ui::Stu_sign_in *ui;
    CascadeClassifier cascade;
    Ptr<face::FaceRecognizer> model;
    QTimer timer_3;

     QTimer timer_4;
    VideoCapture capture;
    Mat frame,gray,frameRGB;
    QString time;
    int num;
    int detect=0;
    int i=0,j=0;
 private slots:
    void readframe();
    void showtime();
   int  Predict(Mat &src);
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void on_pBback_stu_clicked();
};

#endif // STU_SIGN_IN_H
